package com.sfpay.merchant.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sfpay.merchant.auth.entity.system.SysRoleMenu;

import java.util.List;

/**
 * <p>
 * 角色和菜单关联表 Mapper 接口
 * </p>
 *
 * @author fangchen
 * @since 2022-07-18
 */
public interface SysRoleMenuMapper extends BaseMapper<SysRoleMenu> {

    int batchRoleMenu(List<SysRoleMenu> list);

    /**
     * 通过角色ID删除角色和菜单关联
     * @param roleId 角色ID
     * @return 结果
     */
    void deleteRoleMenuByRoleId(Long roleId);

    void deleteRoleMenu(Long[] roleIds);

    int selectCountRoleMenuByMenuId(Long menuId);
}
